package com.xintai.approval.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.List;

/**
 * 流程信息
 */
public class NodeConfig {
    private Long flowId;
    private String nodeName; //标题名称
    private boolean error; // 是否更改标题
    private Integer type; // 类型 0发起1审核人2抄送3条件4分支
    //条件
    private Integer priorityLevel; // 条件等级
    //审批
    private Integer settype; //审批方式的组合按钮1指定成员2主管4发起人自选5发起人自己7连续多级主管
    private Integer selectMode; //发起人自选审批人时 ,选择1一人或2多人
    private Integer selectRange; //发起人自选审批人时，选择范围 1全公司2指定成员3指定角色
    private Integer directorLevel; //发起人的几级主管审批
    private Integer examineMode; //多人审批时 1依次审批  2所有人都审批
    private Integer noHanderAction; //审批人空时，1自动审批通过/不允许发起2转交给审核管理员
    private Integer examineEndDirectorLevel; //发起人的层级主管
    //抄送
    private Integer ccSelfSelectFlag; // 发起人是否自选抄送人
    //存储信息
    private List<Condition> conditionList ; // 选择的条件与数据
    private List<NodeUser> nodeUserList; // 用户
    private List<NodeConfig> conditionNodes; //路由
    private NodeConfig childNode; //下一级
    //父级id
    private String conditionListId; // 选择的条件
    private String nodeUserListId; // 用户
    private String conditionNodesId; //条件
    private Long childNodeId; //下一级

    public Long getFlowId() {
        return flowId;
    }

    public void setFlowId(Long flowId) {
        this.flowId = flowId;
    }

    public String getNodeName() {
        return nodeName;
    }

    public void setNodeName(String nodeName) {
        this.nodeName = nodeName;
    }

    public boolean isError() {
        return error;
    }

    public void setError(boolean error) {
        this.error = error;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getPriorityLevel() {
        return priorityLevel;
    }

    public void setPriorityLevel(Integer priorityLevel) {
        this.priorityLevel = priorityLevel;
    }

    public Integer getSettype() {
        return settype;
    }

    public void setSettype(Integer settype) {
        this.settype = settype;
    }

    public Integer getSelectMode() {
        return selectMode;
    }

    public void setSelectMode(Integer selectMode) {
        this.selectMode = selectMode;
    }

    public Integer getSelectRange() {
        return selectRange;
    }

    public void setSelectRange(Integer selectRange) {
        this.selectRange = selectRange;
    }

    public Integer getDirectorLevel() {
        return directorLevel;
    }

    public void setDirectorLevel(Integer directorLevel) {
        this.directorLevel = directorLevel;
    }

    public Integer getExamineMode() {
        return examineMode;
    }

    public void setExamineMode(Integer examineMode) {
        this.examineMode = examineMode;
    }

    public Integer getNoHanderAction() {
        return noHanderAction;
    }

    public void setNoHanderAction(Integer noHanderAction) {
        this.noHanderAction = noHanderAction;
    }

    public Integer getExamineEndDirectorLevel() {
        return examineEndDirectorLevel;
    }

    public void setExamineEndDirectorLevel(Integer examineEndDirectorLevel) {
        this.examineEndDirectorLevel = examineEndDirectorLevel;
    }

    public Integer getCcSelfSelectFlag() {
        return ccSelfSelectFlag;
    }

    public void setCcSelfSelectFlag(Integer ccSelfSelectFlag) {
        this.ccSelfSelectFlag = ccSelfSelectFlag;
    }

    public List<Condition> getConditionList() {
        return conditionList;
    }

    public void setConditionList(List<Condition> conditionList) {
        this.conditionList = conditionList;
    }

    public List<NodeUser> getNodeUserList() {
        return nodeUserList;
    }

    public void setNodeUserList(List<NodeUser> nodeUserList) {
        this.nodeUserList = nodeUserList;
    }

    public List<NodeConfig> getConditionNodes() {
        return conditionNodes;
    }

    public void setConditionNodes(List<NodeConfig> conditionNodes) {
        this.conditionNodes = conditionNodes;
    }

    public NodeConfig getChildNode() {
        return childNode;
    }

    public void setChildNode(NodeConfig childNode) {
        this.childNode = childNode;
    }

    public String getConditionListId() {
        return conditionListId;
    }

    public void setConditionListId(String conditionListId) {
        this.conditionListId = conditionListId;
    }

    public String getNodeUserListId() {
        return nodeUserListId;
    }

    public void setNodeUserListId(String nodeUserListId) {
        this.nodeUserListId = nodeUserListId;
    }

    public String getConditionNodesId() {
        return conditionNodesId;
    }

    public void setConditionNodesId(String conditionNodesId) {
        this.conditionNodesId = conditionNodesId;
    }

    public Long getChildNodeId() {
        return childNodeId;
    }

    public void setChildNodeId(Long childNodeId) {
        this.childNodeId = childNodeId;
    }

    /*@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("flowid", getFlowId())
                .append("nodename", getNodeName())
                .append("error", isError())
                .append("type", getType())
                .append("prioritylevel", getPriorityLevel())
                .append("settype", getSettype())
                .append("selectmode", getSelectMode())
                .append("selectrange", getSelectRange())
                .append("directorlevel", getDirectorLevel())
                .append("examinemode", getExamineMode())
                .append("nohanderaction", getNoHanderAction())
                .append("examineenddirectorlevel", getExamineEndDirectorLevel())
                .append("ccselfselectflag", getCcSelfSelectFlag())
                .append("conditionlistid", getConditionListId())
                .append("nodeuserlistid", getNodeUserListId())
                .append("conditionnodesid", getConditionNodesId())
                .append("childnodeid", getChildNodeId())
                .append("childnode", getChildNode())
                .append("ConditionNodes", getConditionNodes())
                .append("NodeUserList", getNodeUserList())
                .append("ConditionList", getConditionList())
                .toString();
    }*/

    @Override
    public String toString() {
        return "NodeConfig{" +
                "flowId='" + flowId + '\'' +
                ", nodeName='" + nodeName + '\'' +
                ", error=" + error +
                ", type=" + type +
                ", priorityLevel=" + priorityLevel +
                ", settype=" + settype +
                ", selectMode=" + selectMode +
                ", selectRange=" + selectRange +
                ", directorLevel=" + directorLevel +
                ", examineMode=" + examineMode +
                ", noHanderAction=" + noHanderAction +
                ", examineEndDirectorLevel=" + examineEndDirectorLevel +
                ", ccSelfSelectFlag=" + ccSelfSelectFlag +
                ", conditionList=" + conditionList +
                ", nodeUserList=" + nodeUserList +
                ", conditionNodes=" + conditionNodes +
                ", childNode=" + childNode +
                ", conditionListId='" + conditionListId + '\'' +
                ", nodeUserListId='" + nodeUserListId + '\'' +
                ", conditionNodesId='" + conditionNodesId + '\'' +
                ", childNodeId='" + childNodeId + '\'' +
                '}';
    }

}
